/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.uch.biblioteca.hibernateSpringDao;
import java.util.List;
import java.sql.SQLException;
import net.uch.biblioteca.mapping.TbCatalogo;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.hibernate.criterion.Expression;




/**
 * @author Vasquez
 */
public class HSTbCatalogoDAOImpl extends HibernateDaoSupport implements HSTbCatalogoDAO {
    
    @Override
    public List seleccionarCatalogo(String codigo){
        return this.getSession().createCriteria(TbCatalogo.class).
                add(Expression.eq("catActivo", "1")).
                add(Expression.not(Expression.eq("catCodigoElemento", "000"))).
                add(Expression.eq("catCodigoGrupo", codigo)).list();
    }
}
